1. Field of the Invention
This invention relates to communication protocols and, more particularly, to a system and method for implementing a protocol for detecting and correcting transmission errors in packet-based communications.
2. Description of the Related Art
Various types of networks exist, such as local area networks (LANs), wide area networks (WANs), and the Internet, for transmitting packetized data. For example, the Internet is a “network of networks” based on a packet protocol referred to as Transmission Control Protocol/Internet Protocol (TCP/IP). Also, computer systems and other electronic devices generally include or use buses for the transfer of data between various sub-systems. Exemplary buses, include Peripheral Component Interconnect (PCI), Versa Module Europa (VME), Industry Standard Architecture (ISA), Extended Industry Standard Architecture (EISA), etc. Certain of these buses may also use a packet-based protocol.
In many systems, a first device (e.g., a host computer) may implement a packet-based communication protocol to communicate with a second device (e.g., a remote system) via a transmission medium (e.g., a network or serial link). For example, a first interface of the host computer, which is coupled to the transmission medium, may send a first packet to a second interface of the remote system, which is also coupled to the transmission medium.
In some implementations of packet-based communication protocols, each of the transmitted packets may comprise an error detection code. The error detection code of a transmitted packet is encoded data that is derived from the data comprised in the transmitted packet. For example, the error detection code may be a cyclic redundancy check (CRC) code or a checksum. The error detection code may be used as an error detection mechanism to detect errors in the transmission of a packet.
In a typical implementation, the host system may transmit a packet comprising data and an error detection code (e.g., CRC code) to a remote system. The remote system may receive and store each of the data transmissions associated with the packet and may generate a new error detection code based on the received data comprised in the received packet. Then, the remote system may compare the new error detection code with the received error detection code. The error detection codes should match if the transmitted data were neither lost nor corrupted. If a match is detected, the remote system consumes the data, which may involve further storing the data, sending the data to a device, and/or using the data for the purpose for which it was transmitted. However, if the error detection codes do not match, which may indicate that some of the data was lost or corrupted in the transmission, then the remote system may discard the data and may request a retransmission of the packet. In this implementation, the receiving system (e.g., the remote system) may accumulate or temporarily store all the received data comprised in the received packet to calculate the new error detection code. The accumulation of the data comprised in each of the received packets introduces latency to the packet-based transmission of the data.
Also, in the above-described implementation, a header may be sent at the beginning of each transmitted packet. The header provides the receiving system addressing information, sequence numbers, and other information associated with the transmitted packet. It is noted however that in other embodiments this information may be sent at the end of each transmitted packet. In packet-based transmissions of data, there is usually a trade-off between packet size and latency. More specifically, the greater the packet size, the greater the latency associated with the transmission because more data is accumulated. In this implementation, including the sequence number in the headers increases the size of the headers and increases the size of the packets, which increases the latency associated with the transmission of each packet.
One common I/O function or application domain where computer buses are used is in the area of instrumentation. An instrument is a device which collects data or information from an environment or unit under test (UUT) and optionally displays this information to a user, or which generates a signal, e.g., for stimulating a UUT. An instrument may also perform various data analysis and data processing on acquired data prior to displaying the data to the user. Examples of various types of instruments include data acquisition devices, oscilloscopes, digital multimeters, signal analyzers, signal generators, etc. The types of information that might be collected by respective instruments include voltage, resistance, distance, velocity, pressure, frequency of oscillation, humidity, temperature, image data, and audio data, among others.
Modern instrumentation systems are moving from dedicated stand-alone hardware instruments such as oscilloscopes, digital multimeters, etc., to a concept referred to as virtual instrumentation. Virtual instrumentation systems comprise instrumentation hardware such as circuit boards which plug into general purpose personal computers. The instrumentation hardware is controlled by software which executes on the computers. Many virtual instrument hardware devices have been developed which plug into a PCI bus, or into other buses that use PCI signaling protocols, such as Compact PCI (CPCI) or PCI extensions for Instrumentation (PXI). Other popular instrumentation buses are the VXI (VMEbus eXtensions for Instrumentation) bus and General Purpose Interface Bus (GPIB).
In many applications, often there is a need for the I/O function to be physically located remotely from the host computer. For example, in a measurement application, a data acquisition (DAQ) device may be required to be located in a test chamber which is separated by some distance from the host computer controlling it. As another example, one or more measurement devices may be installed in a chassis that is connected to a computer system. For another example, a notebook computer may use a docking station to couple to other devices which are typically located at the user's desk, where the docking station provides additional PCI expansion capability to the notebook computer. In other words, in many applications it is desirable that the corresponding system be implemented as a distributed system. Note that as used herein, the term “remote” may refer to separation distances between the host system and the remote device of anywhere from a few centimeters to hundreds or even thousands of meters. In other words, the term “remote” denotes that the remote device is coupled to, but distinct from, the host system.
One solution for remotely interfacing devices to a computer is the use of a PCI split bridge system. In a PCI split bridge system, the host computer includes a primary PCI bus and a first interface comprising a first portion of the bridge, the remote system includes a secondary PCI bus and a second interface comprising a second portion of the bridge, and the two systems are coupled via a transmission medium, e.g., a serial or parallel transmission cable. The first interface, the transmission medium, and the second interface may collectively comprise the bridge. In this manner, PCI devices attached to both of the PCI systems may be coupled seamlessly, or transparently, i.e., the PCI expansion devices coupled to the remote PCI bus may appear to the computer system as if they were coupled directly to the local PCI bus in the host computer system. In addition, some new expansion buses, such as PCI Express, use a “switched fabric” architecture that allows a host computer to interface to various remote devices.